<!DOCTYPE html>
<html>
<head>
<title>Detect Burp Proxy</title>
<script>
var display;
var eol = navigator.userAgent.indexOf("MSIE") > -1 ? "\n<br>" : "\n";
function log(message) {
// display.innerHTML += (new Date().toUTCString()) + ":\n" + message + eol;
 display.innerHTML += message + eol;
}
function init() {
 display = document.getElementById("display");
 log("starting");
}
var detected_burp = false;

function go() {
 window.onerror = function(e) {
  log("got error: " + e.message);
  detected_burp = true;
 }
 var target = "http://burp/0";
 log("target: " + target);
  var scr = document.createElement('script');
  scr.type = 'application/javascript';
  scr.src = target;
  scr.onload = scr.onerror = function() {finished();}
  document.head.appendChild(scr);
}
function finished() {
 setTimeout(function() {
 if (!detected_burp){
   log("Burp proxy not detected")
 } else {
   log("*Burp proxy detected*")
 }
 }, 250);
}
</script>
</head>
<body onload="init();go();">
<div id="display" style="white-space: pre; font-family: courier new;font-size: x-large;"></div>
</body>
</html>
